package dao;



import interfaces.IPontos;
import model.Pontos;

import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;

public class DaoPontos extends DaoGenerico<Pontos> implements IPontos {
	
	@Override
	public Pontos getPontosPorId(Long id) {
		Session session = this.getSession();
		Criteria criteria = session.createCriteria(Pontos.class);
		criteria.add(Restrictions.eq("id", id));
		Pontos p = (Pontos) criteria.uniqueResult();
		session.close();
		return p;
	}


}
